package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcDiscussLogSee;
import com.visizen.wisdomclass.server.model.WcDiscussLogSeeExample;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcDiscussLogSeeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_log_see
     *
     * @mbggenerated
     */
    @SelectProvider(type = WcDiscussLogSeeSqlProvider.class, method = "countByExample")
    int countByExample(WcDiscussLogSeeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_log_see
     *
     * @mbggenerated
     */
    @DeleteProvider(type = WcDiscussLogSeeSqlProvider.class, method = "deleteByExample")
    int deleteByExample(WcDiscussLogSeeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_log_see
     *
     * @mbggenerated
     */
    @Delete({
            "delete from wc_discuss_log_see",
            "where log_see_id = #{log_see_id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long log_see_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_log_see
     *
     * @mbggenerated
     */
    @Insert({
            "insert into wc_discuss_log_see (log_see_id, discuss_id, ",
            "user_id, equip_id, ",
            "log_time)",
            "values (#{log_see_id,jdbcType=BIGINT}, #{discuss_id,jdbcType=BIGINT}, ",
            "#{user_id,jdbcType=BIGINT}, #{equip_id,jdbcType=BIGINT}, ",
            "#{log_time,jdbcType=TIMESTAMP})"
    })
    int insert(WcDiscussLogSee record);

    @Update(" update wc_discuss_log_see set equip_id=#{equip_id,jdbcType=BIGINT},log_time=#{log_time,jdbcType=TIMESTAMP}" +
            " where discuss_id=#{discuss_id,jdbcType=BIGINT} and user_id=#{user_id,jdbcType=BIGINT}")
    int updateByDiscussAndUser(WcDiscussLogSee record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_log_see
     *
     * @mbggenerated
     */
    @InsertProvider(type = WcDiscussLogSeeSqlProvider.class, method = "insertSelective")
    int insertSelective(WcDiscussLogSee record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_log_see
     *
     * @mbggenerated
     */
    @SelectProvider(type = WcDiscussLogSeeSqlProvider.class, method = "selectByExample")
    @Results({
            @Result(column = "log_see_id", property = "log_see_id", jdbcType = JdbcType.BIGINT, id = true),
            @Result(column = "discuss_id", property = "discuss_id", jdbcType = JdbcType.BIGINT),
            @Result(column = "user_id", property = "user_id", jdbcType = JdbcType.BIGINT),
            @Result(column = "equip_id", property = "equip_id", jdbcType = JdbcType.BIGINT),
            @Result(column = "log_time", property = "log_time", jdbcType = JdbcType.TIMESTAMP)
    })
    List<WcDiscussLogSee> selectByExample(WcDiscussLogSeeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_log_see
     *
     * @mbggenerated
     */
    @Select({
            "select",
            "log_see_id, discuss_id, user_id, equip_id, log_time",
            "from wc_discuss_log_see",
            "where log_see_id = #{log_see_id,jdbcType=BIGINT}"
    })
    @Results({
            @Result(column = "log_see_id", property = "log_see_id", jdbcType = JdbcType.BIGINT, id = true),
            @Result(column = "discuss_id", property = "discuss_id", jdbcType = JdbcType.BIGINT),
            @Result(column = "user_id", property = "user_id", jdbcType = JdbcType.BIGINT),
            @Result(column = "equip_id", property = "equip_id", jdbcType = JdbcType.BIGINT),
            @Result(column = "log_time", property = "log_time", jdbcType = JdbcType.TIMESTAMP)
    })
    WcDiscussLogSee selectByPrimaryKey(Long log_see_id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_log_see
     *
     * @mbggenerated
     */
    @UpdateProvider(type = WcDiscussLogSeeSqlProvider.class, method = "updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcDiscussLogSee record, @Param("example") WcDiscussLogSeeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_log_see
     *
     * @mbggenerated
     */
    @UpdateProvider(type = WcDiscussLogSeeSqlProvider.class, method = "updateByExample")
    int updateByExample(@Param("record") WcDiscussLogSee record, @Param("example") WcDiscussLogSeeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_log_see
     *
     * @mbggenerated
     */
    @UpdateProvider(type = WcDiscussLogSeeSqlProvider.class, method = "updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcDiscussLogSee record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wc_discuss_log_see
     *
     * @mbggenerated
     */
    @Update({
            "update wc_discuss_log_see",
            "set discuss_id = #{discuss_id,jdbcType=BIGINT},",
            "user_id = #{user_id,jdbcType=BIGINT},",
            "equip_id = #{equip_id,jdbcType=BIGINT},",
            "log_time = #{log_time,jdbcType=TIMESTAMP}",
            "where log_see_id = #{log_see_id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcDiscussLogSee record);
}